package com.bigmi.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bigmi.model.article.Dto.ArticleHomeDto;
import com.bigmi.model.article.pojo.ApArticle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper extends BaseMapper<ApArticle> {

    /**
     *
     * @param articleHomeDto
     * @param type type = 1加载更多 type = 2加载最新
     * @return
     */
    public List<ApArticle> articleList(@Param("dto")ArticleHomeDto articleHomeDto,@Param("type")  Short type);

    public boolean updataByArticleId(@Param("articleId") long articleId );

    public boolean delByArticleId(@Param("articleId") long articleId );
}
